/*
 * Parallel.h
 *
 *  Created on: Nov 5, 2011
 *      Author: Philip Rodriguez, Oliver Wing
 *
 *  Mechanism to kick off the A/D conversion by monitoring
 *  a low-to-high signal from Freescale
 */

#ifndef PARALLEL_H_
#define PARALLEL_H_

#include "types.h"

// The first parallel port usually starts at 0x378. Each parallel port
// is three bytes wide. The first byte is the Data register, the
// second byte is the Status register, the third byte is the
// Control register.
#define DATA_ADDRESS 0x378
#define CTRL_ADDRESS 0x37a
// bit 2 = printer initialisation (high to initialise)
// bit 4 = hardware IRQ (high to enable)
#define INIT_BIT 0x04
#define INTR_BIT 0x10

#define PARALLEL_IRQ 0x07

// The interrupt id set up on the parallel port
extern INT16 interruptId;

// Initialize the settings to monitor interrupts on
// the parallel port
void initParallelPort(void);

#endif /* PARALLEL_H_ */
